package com.server.pinggu.service.impl;

import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import org.apache.commons.lang3.StringUtils;
import com.server.pinggu.mapper.SenFormNotMatchMapper;
import com.server.pinggu.domain.SenFormNotMatch;
import com.server.pinggu.service.ISenFormNotMatchService;

import java.util.List;

/**
 * 【请填写功能名称】Service业务层处理
 *
 * @author ltao
 * @date 2022-10-23
 */
@Service
public class SenFormNotMatchServiceImpl extends ServiceImpl<SenFormNotMatchMapper, SenFormNotMatch> implements ISenFormNotMatchService {

    @Override
    public List<SenFormNotMatch> queryList(SenFormNotMatch senFormNotMatch) {
        LambdaQueryWrapper<SenFormNotMatch> lqw = Wrappers.lambdaQuery();
        if (senFormNotMatch.getFid() != null){
            lqw.eq(SenFormNotMatch::getFid ,senFormNotMatch.getFid());
        }
        if (StringUtils.isNotBlank(senFormNotMatch.getAdr())){
            lqw.eq(SenFormNotMatch::getAdr ,senFormNotMatch.getAdr());
        }
        if (StringUtils.isNotBlank(senFormNotMatch.getVals())){
            lqw.eq(SenFormNotMatch::getVals ,senFormNotMatch.getVals());
        }
        if (senFormNotMatch.getStatus() != null){
            lqw.eq(SenFormNotMatch::getStatus ,senFormNotMatch.getStatus());
        }
        if (senFormNotMatch.getDtime() != null){
            lqw.eq(SenFormNotMatch::getDtime ,senFormNotMatch.getDtime());
        }
        if (senFormNotMatch.getSelected() != null){
            lqw.eq(SenFormNotMatch::getSelected ,senFormNotMatch.getSelected());
        }
        return this.list(lqw);
    }
}